# argo-cd app mainfests
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ project_name }}-argo
  namespace: {{ kubernetes_pipeline_namespace }}
data:
  {{ project_name }}-app.yml: |
    ---
    apiVersion: argoproj.io/v1alpha1
    kind: Application
    metadata:
      name: {{ project_name }}
      namespace: argocd
      finalizers:
        - resources-finalizer.argocd.argoproj.io
    spec:
      project: {{ argo_app_project_name }}
      source:
        directory:
          jsonnet: {}
          recurse: true
        repoURL: {{ k8s_manifests_url }}
        targetRevision: master
        path: {{ env }}/{{ project_class }}/{{ project_name }}
      destination:
        server: {{ kubernetes_api_server }}
        namespace: {{ kubernetes_app_namespace }}
      syncPolicy:
        automated:
          prune: true
          selfHeal: true
        syncOptions:
         - CreateNamespace=true